home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 7
/
Aminet 7 - August 1995.iso
/
Aminet
/
dev
/
misc
/
curses210pch.lha
/
curses210.diffs
next >
Wrap
Text File
|
1995-05-03
|
12KB
|
432 lines
Only in curses210: dlib
diff -r -b -c curses210.orig/src/_ansi.c curses210/src/_ansi.c
*** curses210.orig/src/_ansi.c Mon Feb 21 22:40:10 1994
--- curses210/src/_ansi.c Wed May 03 01:20:01 1995
***************
*** 75,87 ****
--- 75,97 ----
void
_ANSIClear()
{
+ if (_clstr) {
tputs(_clstr, 1, _myputc);
+ } else {
+ fprintf(stdout, "\f");
+ fflush(stdout);
+ }
}
void
_ANSIMove(int line, int col)
{
+ if (_cmstr) {
tputs(tgoto(_cmstr, col, line), 1, _myputc);
+ } else {
+ fprintf(stdout, "\233%d;%dH", line, col);
+ fflush(stdout);
+ }
}
void
***************
*** 123,128 ****
--- 133,139 ----
*
*/
+ #include <clib/alib_protos.h>
/*
* send_packet() - written by Phil Lindsay, Carolyn Scheppner, and Andy
Only in curses210/src: _ansi.c.orig
diff -r -b -c curses210.orig/src/_doecho.c curses210/src/_doecho.c
*** curses210.orig/src/_doecho.c Mon Feb 21 22:40:16 1994
--- curses210/src/_doecho.c Wed May 03 01:20:01 1995
***************
*** 66,73 ****
static char *rcsid = "$Header: /SRC/lib/curses/src/RCS/_doecho.c,v 1.6 1993/05/17 23:33:10 sie Exp $";
#include "acurses.h"
-
void _DoEcho(WINDOW *WinPtr, char c)
{
short x, y;
--- 66,75 ----
static char *rcsid = "$Header: /SRC/lib/curses/src/RCS/_doecho.c,v 1.6 1993/05/17 23:33:10 sie Exp $";
#include "acurses.h"
+ #ifdef _DCC
+ #include <fcntl.h> /* write() Prototype */
+ #endif
void _DoEcho(WINDOW *WinPtr, char c)
{
short x, y;
diff -r -b -c curses210.orig/src/acurses.h curses210/src/acurses.h
*** curses210.orig/src/acurses.h Mon Feb 21 22:40:22 1994
--- curses210/src/acurses.h Wed May 03 01:20:00 1995
***************
*** 65,76 ****
#include <exec/memory.h>
#include <devices/audio.h>
! #ifdef LATTICE
#include <proto/exec.h>
#include <proto/intuition.h>
#include <proto/graphics.h>
#include <dos.h>
#include <proto/console.h>
#include <proto/dos.h>
#endif /* LATTICE */
--- 65,80 ----
#include <exec/memory.h>
#include <devices/audio.h>
! #if defined(LATTICE) || defined(_DCC) || defined(__GNUC__)
#include <proto/exec.h>
#include <proto/intuition.h>
#include <proto/graphics.h>
+ #ifdef LATTICE
#include <dos.h>
#include <proto/console.h>
+ #else
+ #include <clib/console_protos.h>
+ #endif
#include <proto/dos.h>
#endif /* LATTICE */
diff -r -b -c curses210.orig/src/beep.c curses210/src/beep.c
*** curses210.orig/src/beep.c Mon Feb 21 22:40:26 1994
--- curses210/src/beep.c Wed May 03 01:19:50 1995
***************
*** 55,60 ****
--- 55,61 ----
#include <fcntl.h>
#include "acurses.h"
+ #include <clib/alib_protos.h>
beep(void)
{
Only in curses210/src: cursesl.lib
Only in curses210/src: cursesrl.lib
Only in curses210/src: cursess.lib
Only in curses210/src: cursessr.lib
diff -r -b -c curses210.orig/src/initscr.c curses210/src/initscr.c
*** curses210.orig/src/initscr.c Mon Feb 21 22:40:08 1994
--- curses210/src/initscr.c Wed May 03 01:19:52 1995
***************
*** 113,118 ****
--- 113,120 ----
return 0;
}
+ extern void setupterm(void);
+
initscr(void)
{
char *Ptr, *getenv(const char *);
***************
*** 211,227 ****
/* Create stdscr and curscr */
stdscr = newwin(LINES, COLS, 0, 0);
curscr = newwin(LINES, COLS, 0, 0); /* used for redraws */
! #ifdef LATTICE
if(onbreak(_BreakHandler)) {
fprintf(stderr, "Failed to set BREAK handler.\n");
_CleanExit(10);
}
! #else /* LATTICE */
if ((int)signal(SIGINT, _BreakHandler) == -1) {
perror("Failed to set BREAK handler.");
_CleanExit(10);
}
! #endif /* else LATTICE */
if(_CursesType == ANSI_CURSES) {
_ifh = Input();
--- 213,231 ----
/* Create stdscr and curscr */
stdscr = newwin(LINES, COLS, 0, 0);
curscr = newwin(LINES, COLS, 0, 0); /* used for redraws */
! #if defined(LATTICE)
if(onbreak(_BreakHandler)) {
fprintf(stderr, "Failed to set BREAK handler.\n");
_CleanExit(10);
}
! #elif defined(_DCC)
! onbreak(_BreakHandler);
! #else /* LATTICE || _DCC */
if ((int)signal(SIGINT, _BreakHandler) == -1) {
perror("Failed to set BREAK handler.");
_CleanExit(10);
}
! #endif /* else (LATTICE || _DCC) */
if(_CursesType == ANSI_CURSES) {
_ifh = Input();
Only in curses210/src: lib.def
diff -r -b -c curses210.orig/src/mvscanw.c curses210/src/mvscanw.c
*** curses210.orig/src/mvscanw.c Mon Feb 21 22:40:14 1994
--- curses210/src/mvscanw.c Wed May 03 01:20:00 1995
***************
*** 54,59 ****
--- 54,60 ----
#include <stdarg.h>
+ #if 0
mvscanw(short int Line, short int Col, char *fmt,
char *ptr1, char *ptr2, char *ptr3, char *ptr4, char *ptr5,
char *ptr6, char *ptr7, char *ptr8, char *ptr9, char *ptr10)
***************
*** 64,66 ****
--- 65,93 ----
getstr(buffer);
return sscanf(buffer, fmt, ptr1, ptr2, ptr3, ptr4, ptr5, ptr6, ptr7, ptr8, ptr9, ptr10);
}
+ #else
+ mvscanw(short int Line, short int Col, char *fmt, ...)
+ {
+ char buffer[BUFSIZ];
+ char *ptr1, *ptr2, *ptr3, *ptr4, *ptr5, *ptr6, *ptr7, *ptr8, *ptr9, *ptr10;
+ va_list args;
+
+ va_start(args, fmt);
+ ptr1 = va_arg(args, char *);
+ ptr2 = va_arg(args, char *);
+ ptr3 = va_arg(args, char *);
+ ptr4 = va_arg(args, char *);
+ ptr5 = va_arg(args, char *);
+ ptr6 = va_arg(args, char *);
+ ptr7 = va_arg(args, char *);
+ ptr8 = va_arg(args, char *);
+ ptr9 = va_arg(args, char *);
+ ptr10 = va_arg(args, char *);
+ va_end(args);
+
+ move(Line, Col);
+ getstr(buffer);
+ return sscanf(buffer, fmt, ptr1, ptr2, ptr3, ptr4, ptr5, ptr6, ptr7, ptr8, ptr9, ptr10);
+ }
+ #endif
+
diff -r -b -c curses210.orig/src/mvwscanw.c curses210/src/mvwscanw.c
*** curses210.orig/src/mvwscanw.c Mon Feb 21 22:41:18 1994
--- curses210/src/mvwscanw.c Wed May 03 01:20:00 1995
***************
*** 54,59 ****
--- 54,60 ----
#include <stdarg.h>
+ #if 0
mvwscanw(WINDOW *WinPtr, short int Line, short int Col, char *fmt,
char *ptr1, char *ptr2, char *ptr3, char *ptr4, char *ptr5,
char *ptr6, char *ptr7, char *ptr8, char *ptr9, char *ptr10)
***************
*** 64,66 ****
--- 65,92 ----
wgetstr(WinPtr, buffer);
return sscanf(buffer, fmt, ptr1, ptr2, ptr3, ptr4, ptr5, ptr6, ptr7, ptr8, ptr9, ptr10);
}
+ #else
+ mvwscanw(WINDOW *WinPtr, short int Line, short int Col, char *fmt, ...)
+ {
+ char buffer[BUFSIZ];
+ char *ptr1, *ptr2, *ptr3, *ptr4, *ptr5, *ptr6, *ptr7, *ptr8, *ptr9, *ptr10;
+ va_list args;
+
+ va_start(args, fmt);
+ ptr1 = va_arg(args, char *);
+ ptr2 = va_arg(args, char *);
+ ptr3 = va_arg(args, char *);
+ ptr4 = va_arg(args, char *);
+ ptr5 = va_arg(args, char *);
+ ptr6 = va_arg(args, char *);
+ ptr7 = va_arg(args, char *);
+ ptr8 = va_arg(args, char *);
+ ptr9 = va_arg(args, char *);
+ ptr10 = va_arg(args, char *);
+ va_end(args);
+
+ wmove(WinPtr, Line, Col);
+ wgetstr(WinPtr, buffer);
+ return sscanf(buffer, fmt, ptr1, ptr2, ptr3, ptr4, ptr5, ptr6, ptr7, ptr8, ptr9, ptr10);
+ }
+ #endif
diff -r -b -c curses210.orig/src/overlay.c curses210/src/overlay.c
*** curses210.orig/src/overlay.c Mon Feb 21 22:41:10 1994
--- curses210/src/overlay.c Wed May 03 01:20:01 1995
***************
*** 53,57 ****
--- 53,59 ----
overlay(WINDOW *win1, WINDOW *win2)
{
+ extern int _mergewin(WINDOW *, WINDOW *, char);
+
return _mergewin(win1, win2, FALSE);
}
diff -r -b -c curses210.orig/src/overwrite.c curses210/src/overwrite.c
*** curses210.orig/src/overwrite.c Mon Feb 21 22:40:46 1994
--- curses210/src/overwrite.c Wed May 03 01:20:01 1995
***************
*** 53,57 ****
--- 53,59 ----
overwrite(WINDOW *win1, WINDOW *win2)
{
+ extern int _mergewin(WINDOW *, WINDOW *, char);
+
return _mergewin(win1, win2, TRUE);
}
diff -r -b -c curses210.orig/src/scanw.c curses210/src/scanw.c
*** curses210.orig/src/scanw.c Mon Feb 21 22:40:54 1994
--- curses210/src/scanw.c Wed May 03 01:20:00 1995
***************
*** 54,59 ****
--- 54,60 ----
#include <stdarg.h>
+ #if 0
scanw(char *fmt,
char *ptr1, char *ptr2, char *ptr3, char *ptr4, char *ptr5,
char *ptr6, char *ptr7, char *ptr8, char *ptr9, char *ptr10)
***************
*** 63,65 ****
--- 64,90 ----
getstr(buffer);
return sscanf(buffer, fmt, ptr1, ptr2, ptr3, ptr4, ptr5, ptr6, ptr7, ptr8, ptr9, ptr10);
}
+ #else
+ scanw(char *fmt, ...)
+ {
+ char buffer[BUFSIZ];
+ char *ptr1, *ptr2, *ptr3, *ptr4, *ptr5, *ptr6, *ptr7, *ptr8, *ptr9, *ptr10;
+ va_list args;
+
+ va_start(args, fmt);
+ ptr1 = va_arg(args, char *);
+ ptr2 = va_arg(args, char *);
+ ptr3 = va_arg(args, char *);
+ ptr4 = va_arg(args, char *);
+ ptr5 = va_arg(args, char *);
+ ptr6 = va_arg(args, char *);
+ ptr7 = va_arg(args, char *);
+ ptr8 = va_arg(args, char *);
+ ptr9 = va_arg(args, char *);
+ ptr10 = va_arg(args, char *);
+ va_end(args);
+
+ getstr(buffer);
+ return sscanf(buffer, fmt, ptr1, ptr2, ptr3, ptr4, ptr5, ptr6, ptr7, ptr8, ptr9, ptr10);
+ }
+ #endif
diff -r -b -c curses210.orig/src/setupterm.c curses210/src/setupterm.c
*** curses210.orig/src/setupterm.c Mon Feb 21 22:40:06 1994
--- curses210/src/setupterm.c Wed May 03 01:20:01 1995
***************
*** 59,67 ****
{
char *lterm; /* The terminal type */
! if(!(lterm = getenv("TERM"))) {
! fprintf(stderr, "Failed to get terminal type\n");
! return; /* don't know term type */
}
tgetent(__sut_area, lterm);
--- 59,70 ----
{
char *lterm; /* The terminal type */
! if(!(lterm = getenv("TERM"))
! || strcmp(lterm, "amiga") == 0) {
! /* Assuming Amiga console.device */
! _clstr = NULL;
! _cmstr = NULL;
! return;
}
tgetent(__sut_area, lterm);
Only in curses210/src: setupterm.c.orig
diff -r -b -c curses210.orig/src/tputs.c curses210/src/tputs.c
*** curses210.orig/src/tputs.c Mon Feb 21 22:40:40 1994
--- curses210/src/tputs.c Wed May 03 01:20:01 1995
***************
*** 49,54 ****
--- 49,55 ----
#endif /* lint */
#include "acurses.h"
+ #include <ctype.h>
tputs(char *cp, int affcnt, int(*outc)(char))
diff -r -b -c curses210.orig/src/wgetch.c curses210/src/wgetch.c
*** curses210.orig/src/wgetch.c Mon Feb 21 22:40:52 1994
--- curses210/src/wgetch.c Wed May 03 01:19:59 1995
***************
*** 70,76 ****
static unsigned char buffer[RAWBUFSIZ];
int Class, i;
struct IntuiMessage *Message;
! static struct InputEvent ievent = { NULL, IECLASS_RAWKEY, 0, 0, 0 };
char c;
if(!(_CursesFlags & CFLAG_INITSCR)) /* Haven't called initscr() */
--- 70,76 ----
static unsigned char buffer[RAWBUFSIZ];
int Class, i;
struct IntuiMessage *Message;
! static struct InputEvent ievent = { NULL, IECLASS_RAWKEY, 0, 0, 0, { 0, 0 }, { 0, 0 } };
char c;
if(!(_CursesFlags & CFLAG_INITSCR)) /* Haven't called initscr() */
diff -r -b -c curses210.orig/src/wscanw.c curses210/src/wscanw.c
*** curses210.orig/src/wscanw.c Mon Feb 21 22:41:02 1994
--- curses210/src/wscanw.c Wed May 03 01:19:59 1995
***************
*** 53,58 ****
--- 53,59 ----
#include "curses.h"
#include <stdarg.h>
+ #if 0
wscanw(WINDOW *WinPtr, char *fmt,
char *ptr1, char *ptr2, char *ptr3, char *ptr4, char *ptr5,
char *ptr6, char *ptr7, char *ptr8, char *ptr9, char *ptr10)
***************
*** 62,64 ****
--- 63,88 ----
wgetstr(WinPtr, buffer);
return sscanf(buffer, fmt, ptr1, ptr2, ptr3, ptr4, ptr5, ptr6, ptr7, ptr8, ptr9, ptr10);
}
+ #else
+ wscanw(WINDOW *WinPtr, char *fmt, ...)
+
+ { char *ptr1, *ptr2, *ptr3, *ptr4, *ptr5, *ptr6, *ptr7, *ptr8, *ptr9, *ptr10;
+ va_list args;
+ char buffer[BUFSIZ];
+
+ va_start(args, fmt);
+ ptr1 = va_arg(args, char *);
+ ptr2 = va_arg(args, char *);
+ ptr3 = va_arg(args, char *);
+ ptr4 = va_arg(args, char *);
+ ptr5 = va_arg(args, char *);
+ ptr6 = va_arg(args, char *);
+ ptr7 = va_arg(args, char *);
+ ptr8 = va_arg(args, char *);
+ ptr9 = va_arg(args, char *);
+ ptr10 = va_arg(args, char *);
+ va_end(args);
+
+ return sscanf(buffer, fmt, ptr1, ptr2, ptr3, ptr4, ptr5, ptr6, ptr7, ptr8, ptr9, ptr10);
+ }
+ #endif